<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="${pageContext.request.contextPath}/include/pageTitleBread.jsp"/>
<div id="page-content">
    <div class="col-lg-12">
        <div class="panel">
            <div class="panel-heading">
                <h3 class="panel-title">${pageInfo.innerTitle}</h3>
            </div>
            <form id="orderInfoForm" class="panel-body form-horizontal form-padding">


						<input id="flId" name="flId" value="${orderInfo.flId}"  type="hidden">
        <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flOrderNo" name="flOrderNo" value="${orderInfo.flOrderNo}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flUserId" name="flUserId" value="${orderInfo.flUserId}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flOrderTotal" name="flOrderTotal" value="${orderInfo.flOrderTotal}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">0:待付款,1:待发货,2:待收货,3待评价,4退款中,5退款失败,6:退款成功,-1:订单结束：</label>
								<div class="col-sm-8">
									<input id="flStatus" name="flStatus" value="${orderInfo.flStatus}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">0:待支付,1:支付成功：</label>
								<div class="col-sm-8">
									<input id="flPayStatus" name="flPayStatus" value="${orderInfo.flPayStatus}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flPayTime" name="flPayTime" value="${orderInfo.flPayTime}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flRefundNo" name="flRefundNo" value="${orderInfo.flRefundNo}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flRefundAmount" name="flRefundAmount" value="${orderInfo.flRefundAmount}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flRefundFailReason" name="flRefundFailReason" value="${orderInfo.flRefundFailReason}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flRefundReason" name="flRefundReason" value="${orderInfo.flRefundReason}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flReceiverPhone" name="flReceiverPhone" value="${orderInfo.flReceiverPhone}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flReceiverAddr" name="flReceiverAddr" value="${orderInfo.flReceiverAddr}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flReceiverName" name="flReceiverName" value="${orderInfo.flReceiverName}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							    <div class="form-group">
								<label class="col-sm-3 control-label">：</label>
								<div class="col-sm-8">
									<input id="flCreatedTime" name="flCreatedTime" value="${orderInfo.flCreatedTime}" class="form-control" type="text">
									<small class="help-block">请输入XXXX</small>
								</div>
							</div>
							                <div class="panel-footer">
                    <div class="row">
                        <div class="col-sm-9 col-sm-offset-3">
                            <button class="btn btn-warning" type="reset">重置</button>
                            <button class="btn btn-mint" type="submit">保存</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>

    function save() {
        var data = common_ajax.ajaxFunc("/orderInfo/saveOrUpdate", $('#orderInfoForm').serialize(), "json", null);
        if (data.code === 0) {
            pointLion.alertMsg("保存成功!", "success", "small", function () {
                doPjax(ctx + '/orderInfo');//跳转到列表页
            });
        } else {
            pointLion.alertMsg("操作失败!", "danger", "small", function () {
                doPjax(ctx + '/orderInfo');//跳转到列表页
            });
        }
    }

    $(document).ready(function () {
        $('#orderInfoForm').bootstrapValidator({
            excluded: [":hidden"],//关键配置，表示只对于隐藏域不进行验证，其他的表单元素都要验证
            fields: {
                "flCode": {
                    validators: {
                        notEmpty: {
                            message: '*XXXX不能为空!'
                        },
                        stringLength: {
                            min: 2,
                            message: '*XXXX必须大于两位'
                        }
                    }
                },
                "flName": {
                    validators: {
                        notEmpty: {
                            message: '*XXXX不能为空'
                        },
                        stringLength: {
                            min: 2,
                            message: '*XXXX必须大于两位'
                        }
                    }
                }
            }
        }).on("success.form.bv", function (e) {
            save();
            return false;//阻止表单跳转
        });
    });
</script>
